<template xmlns="http://www.w3.org/1999/html">
  <div>
    <el-form>
      <el-form-item style="padding-left: 14px; padding-top: 14px">
        <el-button type="primary" @click="$router.push('/center')">返回</el-button>
      </el-form-item>
    </el-form>
<el-container>
  <el-main>
    <el-table
        :header-cell-style="headStyle"
        :data="tableData"
        stripe
        border
        style="width: 100%;">
      <el-table-column
          prop="id"
          label="订单号"
          width="150">
      </el-table-column>
      <el-table-column
          prop="roomnId"
          label="影厅"
          width="120">
      </el-table-column>
      <el-table-column
          prop="film"
          label="电影"
          width="120">
      </el-table-column>
      <el-table-column
          prop="time"
          label="时间">
      </el-table-column>
      <el-table-column
          prop="status"
          label="支付状态"
          width="300">
      </el-table-column>
      <el-table-column
          prop="cost"
          label="价格"
          width="120">
      </el-table-column>

      <el-table-column
          align="center"
          label="操作"
          width="400">
        <template slot-scope="scope">
          <!--        使用v - if 判断订单条件 控制不同功能        -->
          <el-popconfirm
              confirm-button-text='确定'
              cancel-button-text='取消'
              icon="el-icon-info"
              icon-color="red"
              title="是否支付"
          >
            <el-button slot="reference">支付</el-button>
          </el-popconfirm>
          <el-popconfirm
              confirm-button-text='是的'
              cancel-button-text='不用了'
              icon="el-icon-info"
              icon-color="red"
              title="是否确定取消？"
          >
            <el-button slot="reference">取消</el-button>
          </el-popconfirm>
          <el-popconfirm
              confirm-button-text='好的'
              cancel-button-text='不用了'
              icon="el-icon-info"
              icon-color="red"
              title="确定退款？"
          >
            <el-button slot="reference">退款</el-button>
          </el-popconfirm>
          <!--                <el-button v-if="" @click="" type="text" size="small">支付</el-button>-->
          <!--                <el-button v-if=""@click="" type="text" size="small">取消</el-button>-->
          <!--                <el-button v-if=""@click="" type="text" size="small">退款</el-button>-->
        </template>
      </el-table-column>

    </el-table>
  </el-main>
</el-container>
    <div  style="padding:10px 0">
      <el-pagination
          :page-size="20"
          :pager-count="11"
          layout="total, sizes, prev, pager, next, jumper"
          :total="1000"
          style="margin-left: 300px">
      </el-pagination>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    handleClick(row) {
      console.log(row);
    },
    headStyle(){
      return "text-align:center"
    }
  },

  data() {
    return {
      tableData: [{
        id: '1',
        roomId: '1',
        film: '封神',
        time: '2022/9/2-20:00',
        status: '未支付',
        cost: '40.5'
      }]
    }
  }
}
</script>